home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 49
/
Amiga Format CD49 (2000-01-17)(Future Publishing)(GB)(Track 1 of 3)[!][issue 2000-02].iso
/
-in_the_mag-
/
banging_the_metal
/
clocks
/
resclock
/
setbattclock.doc
< prev
Wrap
Text File
|
1999-11-30
|
2KB
|
38 lines
SetBattClock -- a KS1.2 compatible equivalent of OS2.0+ SetClock
Starting with AmigaOS 2.0, the battery-backed clock is accessed through
battclock.resource, instead of directly poking the hardware registers.
Among other things, this allows programs like ResClock to take over
battclock.resource, replacing it with their own software-based resetproof
clock.
ResClock should work quite well even under KickStart 1.2. However, the
SetClock program provided on pre-2.0 Workbench disks uses its own method of
accessing the battery-backed clock, entirely bypassing ResClock. To make
ResClock useful even on these older Amigas, the support program SetBattClock
is included.
To use SetBattClock, place it somewhere along your path (such as in the
C: directory) and replace all calls to SetClock in your S:Startup-Sequence
with calls to SetBattClock. The arguments supported are:
SetBattClock load ; loads time from battclock.resource to system clock
SetBattClock save ; saves time from system clock to battclock.resource
SetBattClock reset ; resets battclock.resource to 01-Jan-78, 00:00:00
Note: SetBattClock's user interface can only be described as crude. It
only looks at the first letter of its first argument. If none exists, or if
it isn't 'S' or 'R', SetBattClock assumes it should load the time.
Under KickStart 2.0 or later, SetBattClock should work exactly like the
system SetClock command. Under earlier KickStarts it will fail silently
with a return code of 20 unless ResClock is active.
SetBattClock is part of the ResClock package, and is placed in the
Public Domain. If you like ResClock / SetBattClock, or wish to report
problems or suggest improvements, please send e-mail to Ilmari Karonen
<iltzu@sci.fi>. The latest version of ResClock / SetBattClock should be
available from Aminet or from my web pages at http://www.sci.fi/~iltzu/